package com.lz.entity;

import com.lz.enums.OrderStatusEnum;
import com.lz.enums.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by lz on 2018/8/17.
 */
@Entity
@Data
@DynamicUpdate
@DynamicInsert
public class OrderMaster {

    /** 订单id */
    @Id
    private String orderId;

    /** 买家名称 */
    private String buyerName;

    /** 买家电话 */
    private String buyerPhone;

    /** 买家地址 */
    private String buyerAddress;

    /** 买家微信id */
    private String buyerOpenid;

    /** 订单金额 */
    private BigDecimal orderAmount;

    /** 订单状态 */
    private Integer orderStatus = OrderStatusEnum.NEW.getCode();

    /** 支付状态 */
    private Integer payStatus = PayStatusEnum.WAIT.getCode();

    private Date createTime;

    private Date updateTime;

}
